<template>
  <div class="sectionCard">
    <Header></Header>
    <CarouselFigure></CarouselFigure>
    <Menu></Menu>
    <div class="container">
      <div class="title">
        <p class="details">
          <slot name="sectionTitle"></slot>
        </p>
      </div>
      <div class="containerDetail">
        <div class="img">
          <el-image class="img" :src="datacontent.videoLink"></el-image>
        </div>
        <div class="content">
          <h3>{{datacontent.content}}</h3>
          <p class="linkTitle">{{datacontent.title}}</p>
          <div v-for="(item,index) in datacontent.childrenEntities" :key="index">
            <div class="LinkDetails">
              <a :href="item.videoLink">
                <p class="linkDetail">{{item.title}}</p>
              </a>
              <p class="dec">{{item.content}}</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Header from "../Header.vue";
import CarouselFigure from "../CarouselFigure.vue";
import Menu from '../../components/Menu.vue';
export default {
  props: ["list"],
  data() {
    return {
      datacontent: []
    };
  },
  components: {
    Header,
    CarouselFigure,
    Menu
  },
  watch: {
    list(val) {
      this.datacontent = val[0];
      console.log(this.datacontent);
    }
  }
};
</script>

<style>
a {
  text-decoration: underline;
  color: #000;
}
.sectionCard {
  width: 100%;
  height: auto;
}
.sectionCard .container {
  width: 80%;
  margin: 0 auto;
  margin-top: 50px;
}
.sectionCard .container .containerDetail {
  display: flex;
  /* align-items: center; */
  /* justify-content: space-between; */
}
.sectionCard .container .img img {
  display: block;
  width: 100%;
  height: auto;
}
.sectionCard .container .containerDetail .content {
  /* width: 50%; */
  margin-left: 30px;
}
.sectionCard .container .containerDetail .content h3 {
  font-size: 16px;
  text-indent: 2em;
  color: #000;
  line-height: 2em;
}
.sectionCard .container .containerDetail .img {
  width: 400px;
  height: auto;
}
.sectionCard .container .title {
  margin: 20px 0 20px 0px;
}
.sectionCard .container .details {
  display: inline-block;
  height: 50px;
  background-color: rgb(1, 140, 191);
  line-height: 50px;
  padding: 0px 20px;
  font-weight: 400;
  font-size: 20px;
  color: rgb(255, 255, 255);
  text-align: center;
}
.sectionCard .container .LinkDetails {
  margin-bottom: 25px;
  margin-top: 25px;
  padding-bottom: 10px;
  box-shadow: #eee 0 5px 5px;
}
.sectionCard .container .linkTitle {
  font-size: 18px;
  margin-top: 20px;
  line-height: 30px;
  height: 30px;
  color: rgb(27, 147, 196);
  font-weight: 600;
}
.sectionCard .container .linkDetail {
  font-size: 16px;
  font-size: 14px;
  letter-spacing: 0.1em;
  line-height: 2em;
  font-weight: 600;
}
.sectionCard .container .LinkDetails .dec {
  font-size: 16px;
}
@media screen and (max-width: 1000px) {
  .sectionCard .container .containerDetail {
    display: block;
  }
  .sectionCard .container .containerDetail .content {
    width: 100%;
    height: auto;
    margin-left: 0;
  }
  .sectionCard .container .containerDetail .img {
    width: 100%;
  }
  .sectionCard .container .containerDetail .img img {
    padding: 0 !important;
  }
  .sectionCard .container .title {
    margin: 0;
  }
}
</style>